package com.guangaiboen.attendance.core.dispatcher.other.simplehttp;//package com.answern.claimv2.main.test.http;
//
//import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty;
//import org.springframework.boot.context.properties.ConfigurationProperties;
//import org.springframework.context.annotation.Bean;
//import org.springframework.context.annotation.Configuration;
//
//@Configuration
////@ConditionalOnProperty(name="http.maxConnTotal")
//public class HttpClientConfigurer {
//
//    /**
//     * yml
//     *  http:
//     *    maxConnTotal: 100
//     *    maxConnPerRoute: 20
//     *    connectTimeout: 10000
//     *    connectionRequestTimeout: 60000
//     *    socketTimeout: 60000
//     *    retryCount: 0
//     *    keepAlive: true
//     */
//    @Bean
//    //@ConfigurationProperties("http")
//    public HttpClientFactoryBean HttpClientFactoryBean() {
//        HttpClientFactoryBean httpClientFactoryBean = new HttpClientFactoryBean();
//
//        httpClientFactoryBean.setMaxConnTotal(100);
//        httpClientFactoryBean.setMaxConnPerRoute(20);
//        httpClientFactoryBean.setConnectTimeout(10000);
//        httpClientFactoryBean.setConnectionRequestTimeout(60000);
//        httpClientFactoryBean.setSocketTimeout(60000);
//        httpClientFactoryBean.setRetryCount(0);
//        httpClientFactoryBean.setKeepAlive(true);
//
//        return httpClientFactoryBean;
//    }
//}
